You can pass a pointer to an audio selection record to the SndStartFilePlay function to play only part of a sound in a file on disk. The AudioSelection data type defines an audio selection record.
TYPE AudioSelection =
PACKED RECORD
unitType: LongInt; {type of time unit}
selStart: Fixed; {starting point of selection}
selEnd: Fixed; {ending point of selection}
END;
Use a constant to specify the unit type.
CONST
unitTypeSeconds = $0000; {seconds}
unitTypeNoSelection = $FFFF; {no selection}
If the value in the unitType field is unitTypeNoSelection , then the values in the selStart and selEnd fields are ignored and the entire sound plays. Alternatively, if you wish to play an entire sound, you can pass NIL instead of a pointer to an audio selection record to the SndStartFilePlay function.
| Previous | Chapter contents | Chapter top | Section top | Next |